|
Header: |
Files.h |
|
Carbon status: |
Supported |
Adds an icon definition to the desktop database. This function runs asynchronously.
OSErr PBDTAddIconAsync (
DTPBPtr paramBlock
);
-
paramBlock
-
A pointer to a desktop parameter block.
-
-
function result
-
A result code.
DISCUSSION
Clear all fields (other than input fields) in the parameter block that you pass to Desktop Manager functions. The relevant fields of the parameter block for this function are:
- ioCompletionOn input, a universal procedure pointer to a completion function. A value of type IOCompletionUPP.
- ioResultOn return, the result code of the function. A value of t ype OSErr.
- ioDTRefNumOn input, the desktop database reference number of the database to which you wish to add an icon. A value of type SInt16.
- ioTagInfoOn input, reserved; must be set to 0. A value of type SInt32.
- ioDTBufferOn input, a pointer to the buffer which you have allocated for the icon’s bitmap. A value of type Ptr.
- ioDTReqCountOn input, the size in bytes of the buffer that you’ve allocated for the icon’s bitmap. This value depends on the icon type. Be sure to allocate enough storage for the icon data; 1024 bytes is the largest amount required for any icon in System 7. A value of type SInt32. For a descriptionof the values you can use here, see “Icon Size Constants”.
- ioIconType On input, the icon type. A value of type SInt8. See
“Icon Type Constants” for a description of the values you can use here.
- ioFileCreatorOn input, the icon’s file creator. A value of type OSType.
- ioFileTypeOn input, the icon’s file type. A value of type OSType.
If the database already contains an icon definition for an icon of that type, file type, and file creator, the new definition replaces the old.
SPECIAL CONSIDERATIONS
All of the Desktop Manager functions may move or purge memory blocks in the application heap or for some other reason should not be called from within an interrupt. Your application should not call Desktop Manager functions at interrupt time.
AVAILABILITY
Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)